/*
 * @Author: AskMeWhy
 * @Date: 2020-12-27 11:58:47
 * @Last Modified by: AskMeWhy
 * @Last Modified time: 2020-12-29 11:37:33
 */
const app = getApp();
const { AskComponent } = app._require("common/index");

AskComponent({
    properties: {
        item: {
            type: Object,
            value: {},
        }
    },
    data: {
    },
    lifetimes: {
        attached() {
            // 在组件实例进入页面节点树时执行
            // let pageList = getCurrentPages();
            // this.setData({
            //     active: "/" + pageList[pageList.length - 1].route,
            // });
        },
        detached() {
            // 在组件实例被从页面节点树移除时执行
        },
    },
    methods: {
        handleClick(e) {
            let { item, type } = e.currentTarget.dataset;

            console.log(item);
            console.log(type);
            console.log(e.currentTarget.dataset);


            this.$emit(type, { value: this.data.item })
        },
    },
});
